Skip to content

No-assertions should not affect assertions in built-ins #681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2017

Conversation

peterschrammel
Copy link
Member

This PR includes a clean-up of various checks whether something is a built-in.

@kroening
Copy link
Member

Is there then any way at all to disable the built-in checks?

@peterschrammel
Copy link
Member Author

peterschrammel commented Mar 23, 2017

Currently not. Shall we distinguish between no-assertions at all and no-user-assertions?

@martin-cs
Copy link
Collaborator

martin-cs commented Mar 23, 2017 via email

@peterschrammel
Copy link
Member Author

It's a customer request who wants to disable his own assertions while keeping the checks in built-ins (Eg memory checks in free()).

@tautschnig
Copy link
Collaborator

tautschnig commented Mar 23, 2017

I believe a user's assertions can be disabled by compiling/running with -DNDEBUG. So maybe more fine-grained control to permit disabled built-in assertions is required.

@tautschnig
Copy link
Collaborator

Overall, the first two commits are great, the third one seems debatable.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we'll need an additional flag no-built-in-assertions if this is to go in. See my earlier comments in the conversation for further thoughts.

@peterschrammel
Copy link
Member Author

The third commit was the actual reason for the PR ;)

The current description of the option --no-assertion says "ignore user assertions", which is confusing because it also disables built-in assertions. A user cannot really understand the difference between an instrumented assertion and a built-in assertion. The user only understands what her own assertions are and then sees assertions being added by CBMC.

Suggestion:

  • --no-assertions ignores user assertions only
  • Adding --no-built-in-assertions to disable built-in assertions

More fine-grained control over the latter can be introduced if requested.

This commit changes the behahaviour of --no-assertions so that
only user assertions are ignored.
Built-in assertions can be hidden by the new option
--no-built-in-assertions.
@peterschrammel peterschrammel force-pushed the no-assertions-for-user-only branch from 9dee64e to 85a7566 Compare March 23, 2017 19:25
@peterschrammel
Copy link
Member Author

@tautschnig, this is green now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants